﻿using System;
using System.Threading.Tasks;

using Scheduler;

using EventArgs = Scheduler.EventArgs;

namespace UnitTesting.Middlewares
{

    /// <summary>
    /// 测试通讯单元
    /// </summary>
    internal class BaseTesterMiddleware : Middleware
    {
        public override bool Filter(Context ctx, EventArgs args)
        {
            return true;
            throw new NotImplementedException();
        }

        protected override void DoHandleEvent(Context ctx, EventArgs args)
        {
            Random rd = new Random(DateTime.Now.Millisecond);
            var tm = rd.Next(2000, 3200);
            Task.Delay(tm);
            return;
            throw new NotImplementedException();
        }
    }
}